local sk__qicai = fk.CreateSkill {

  name = "sk__qicai",

  tags = { Skill.Compulsory, },

}



sk__qicai:addEffect(fk.AfterCardsMove, {
  name = "sk__qicai",
  anim_type = "drawcard",
  can_trigger = function(self, event, target, player, data)
    if player:hasSkill(sk__qicai.name) then
      for _, move in ipairs(data) do
        if move.from == player then
          for _, info in ipairs(move.moveInfo) do
            if info.fromArea == Card.PlayerHand then
              return true
            end
          end
        end
      end
    end
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local judge = {
      who = player,
      reason = sk__qicai.name,
      pattern = ".|.|heart,diamond",
    }
    room:judge(judge)
    if not player.dead and judge.card.color == Card.Red then
      player:drawCards(1, sk__qicai.name)
    end
  end,
})

return sk__qicai